<html>
	<head>
		<title>auto-reload</title>
		<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'/>
		<script language="javascript">document.domain="www.baidu.com";</script>
		<script>
			function SetWinHeight(obj) { 
				var ifm= document.getElementsByTagName("iframe")[0];
				ifm.height = document.documentElement.scrollHeight; //获取自身高度
			} 

			function reloadPage(){
				try{
					var myIframe = document.getElementsByTagName("iframe")[0];
					// myIframe.height = myIframe.contentWindow.document.documentElement.scrollHeight;
				}catch(excption){
				}
			}
			
			function getSubFrameElement() {
				//获取iframe的window对象
				// var topWin = window.top.document.getElementById("iframepage").contentWindow;
				//通过获取到的window对象操作HTML元素，这和普通页面一样
				window.document.getElementById("su").style.visibility = "visible";
			}
			
			window.setInterval("reloadPage()",3000);
		</script>
	</head>
	<body>
		<div>
			<iframe id="iframepage" src="http://baidu.com" name="autoTarget" frameborder="0" scrolling="no" onload="Javascript:SetWinHeight(this)" width="100%" />
		</div>
	</body>
</html>